<form role="form" action="" class="frm-operate" method="post">
    <div class="card shadow-none">
        <div class="card-body">
            <div class="form-group row">
                <label for="frm-group_id" class="col-sm-2 row-form-label">{:lang("Member group")}: </label>
                <div class="col-sm-8">
                    <input type="text" id="frm-group_id" class="form-control selectpage" value="{$row['group_id']}" name="row[group_id]" data-select-only="true" data-pagination="false" data-multiple="true" data-data="{:url('/user.user/getGroup')}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-username" class="col-sm-2 row-form-label">{:lang("Username")}: </label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-username" name="row[username]" placeholder="{:lang("Username")}" data-rule="required;length(3~16)" value="{$row['username']}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-nickname" class="col-sm-2 row-form-label">{:lang("Nickname")}: </label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-nickname" name="row[nickname]" placeholder="{:lang("Nickname")}" value="{$row['nickname']}" data-rule="required;length(2~16)">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-mobile" class="col-sm-2 row-form-label">{:lang("Mobile")}: </label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-mobile" name="row[mobile]" placeholder="{:lang("Mobile")}" data-rule="mobile" value="{$row['mobile']}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-email" class="col-sm-2 row-form-label">{:lang("Email")}: </label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-email" name="row[email]" placeholder="{:lang("Email")}" data-rule="email" value="{$row['email']}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-password" class="col-sm-2 row-form-label">{:lang("Password")}: </label>
                <div class="col-sm-8">
                    <input type="password" class="form-control" id="frm-password" name="row[password]" data-rule="length(2~16)">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-money" class="col-sm-2 row-form-label">{:lang("Money")}: </label>
                <div class="col-sm-8">
                    <input type="number" class="form-control" id="frm-money" name="row[money]" value="{$row['money']}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-score" class="col-sm-2 row-form-label">{:lang("Score")}: </label>
                <div class="col-sm-8">
                    <input type="number" class="form-control" id="frm-score" name="row[score]" value="{$row['score']}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-level" class="col-sm-2 row-form-label">{:lang("Level")}: </label>
                <div class="col-sm-8">
                    <input type="number" class="form-control" id="frm-level" name="row[level]" value="{$row['level']}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-exp" class="col-sm-2 row-form-label">{:lang("Exp")}: </label>
                <div class="col-sm-8">
                    <input type="number" class="form-control" id="frm-exp" name="row[exp]" value="{$row['exp']}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-avatar" class="col-sm-2 row-form-label">{:lang("Avatar")}</label>
                <div class="col-sm-8 fileGroup">
                    <div class="file-btn">
                        <input type="text" class="form-control txt-files" id="frm-avatar" name="row[avatar]" value="{$row['avatar']}">
                        <input type="button"
                               class="btn btn-default btn-imgUpload"
                               data-mimetype="image/*"
                               data-multiple="false"
                               data-field="frm-avatar"
                               value="{:lang('Upload image')}">
                        <input type="button"
                               class="btn btn-default btn-imgSelect"
                               data-mimetype="image/jpeg,image/png"
                               data-multiple="false"
                               data-field="frm-avatar"
                               value="{:lang('Select image')}">
                    </div>
                    <div class="file-preview row mt-2"></div>
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-gender" class="col-sm-2 row-form-label">{:lang("Gender")}: </label>
                <div class="col-sm-8">
                    <select name="row[gender]" class="form-control">
                        <option value="0" {if $row['gender']==0}{/if}>{:lang('Keep secret')}</option>
                        <option value="1" {if $row['gender']==1}{/if}>{:lang('male')}</option>
                        <option value="2" {if $row['gender']==2}{/if}>{:lang('Female')}</option>
                    </select>
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-birthday" class="col-sm-2 row-form-label">{:lang("Birthday")}: </label>
                <div class="col-sm-8">
                    <input type="text" class="form-control laydate" id="frm-birthday" name="row[birthday]" value="{$row['birthday']}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-introduction" class="col-sm-2 row-form-label">{:lang("Introduction")}: </label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-introduction" name="row[introduction]" value="{$row['introduction']}">
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("Latest time")}: </label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" value="{$row['latest_time']}" disabled>
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("Login time")}: </label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" value="{$row['login_time']}" disabled>
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("Login ip")}: </label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" value="{$row['login_ip']}" disabled>
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("Number of failed logins")}: </label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" value="{$row['login_failed']}" disabled>
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-remark" class="col-sm-2 row-form-label">{:lang("Remark")}: </label>
                <div class="col-sm-8">
                    <textarea class="form-control" id="frm-remark" name="row[remark]" rows="3" placeholder="{:lang("Remark")}">{$row['remark']}</textarea>
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("Status")}: </label>
                <div class="col-sm-8">
                    {:build_radios('row[status]',['normal'=>lang("Normal"),'hidden'=>lang("Hidden")], $row['status'])}
                </div>
            </div>
        </div>
        <div class="card-footer">
            <div class="row justify-content-around">
                <div class="col-sm-8">
                    <button type="submit" class="btn btn-primary btn-submit">{:lang('Submit')}</button>
                    <button type="reset" class="btn btn-default">{:lang('Reset')}</button>
                </div>
            </div>
        </div>
    </div>
</form>
{block:script}
<script>
    require(['admin','form'], function (undefined,Form) {
        Form.api.init();
    })
</script>
{/block:script}